﻿using System.Drawing;

namespace DrawTools.Editor
{
  public class EditorTheme
  {
    private const int FontSizeStepConst = 2;
    private const int FontSizeMinConst = 12;
    private const int FontSizeMaxConst = 128;

    public Color[] Colors { get; private set; }
    public int[] BorderWidths { get; private set; }

    public EditorColorSettrings TextSettings { get; private set; }
    public EditorColorSettrings ArrowSettings { get; private set; }
    public EditorColorSettrings RectangleSettings { get; private set; }
    public EditorColorSettrings EllipseSettings { get; private set; }

    public int FontSizeStep
    {
      get { return FontSizeStepConst; }
    }

    public int FontSizeMin
    {
      get { return FontSizeMinConst; }
    }

    public int FontSizeMax
    {
      get { return FontSizeMaxConst; }
    }

    public EditorTheme()
    {
      Colors = new[]
      {
        Color.FromArgb(255, 255, 255),
        Color.FromArgb(78, 128, 188),
        Color.FromArgb(191, 78, 75),
        Color.FromArgb(154, 186, 87),
        Color.FromArgb(127, 98, 160),
        Color.FromArgb(74, 171, 197),
        Color.FromArgb(246, 149, 69)
      };

      BorderWidths = new[] { 1, 3, 5, 7, 9 };

      TextSettings = new EditorColorSettrings
      {
        BackColor = Colors[3],
        BorderColor = Colors[3],
        TextColor = Colors[0]
      };

      RectangleSettings = new EditorColorSettrings
      {
        BackColor = Colors[0],
        BorderColor = Colors[2]
      };

      EllipseSettings = new EditorColorSettrings
      {
        BackColor = Colors[0],
        BorderColor = Colors[2]
      };

      ArrowSettings = new EditorColorSettrings
      {
        BorderColor = Colors[6]
      };
    }
  }
}